package learn.config;

/**
 * @Description: spring- druid数据源配置  改用 starter
 * @Author yxc
 * @Date 2022/1/9
 */

//@Deprecated
//@Configuration
public class MyDataSourceConfig {

/*    @ConfigurationProperties("spring.datasource")
    @Bean
    public DataSource myDataSoutce() throws SQLException {
        DruidDataSource dataSource = new DruidDataSource();
        dataSource.setFilters("stat");
        return dataSource;
    }

    @Bean
    public FilterRegistrationBean webStatFilter(){
        WebStatFilter webStatFilter = new WebStatFilter();

        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
        filterRegistrationBean.setFilter(webStatFilter);
        filterRegistrationBean.setUrlPatterns(Arrays.asList("/*"));
        filterRegistrationBean.addInitParameter("exclusions","*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*");
        return filterRegistrationBean;
    }*/
}
